home *** CD-ROM | disk | FTP | other *** search
/ Shareware Super Platinum 8 / Shareware Super Platinum 8.iso / mac / BACKUP / COPYX23.ZIP;1 / TBU.DOC < prev    next >
Encoding:
Text File  |  1991-11-01  |  4.9 KB  |  109 lines

  1.  
  2. tBU v1.1 - Batch Utility - Planet Terus
  3.  
  4. Usage:    tbu <option symbol arg1 arg2 ...> <option ... >
  5.  
  6. Sets the DOS environment symbol based on the option chosen.  tBU will
  7. process multiple sets of option-symbol-arg sets from left to right.
  8.  
  9. Symbols may be used in batch commands as %SYMBOL% (symbol must appear
  10. in all capital letters). The symbol set by tBU CAN be empty. To check
  11. for an empty symbol use something like:
  12.     IF (%SYMBOL%) == () echo It's empty
  13.     IF not (%SYMBOL%) == () echo It's not empty
  14.  
  15. ERRORLEVEL is returned as 255 if error occured. The option character
  16. may be either a dash (-) or a slash (/).
  17.  
  18. Options:
  19.   -f  Parse filename & extension.      <sym> <filespec>
  20.       Sets symbol to the filename portion of arg1. Any dot name/
  21.       extension separator is not changed.
  22.       ERRORLEVEL:  Length of resulting string.
  23.       Example:  tbu -f file c:\tbu.exe  sets file to tbu.exe
  24.                 tbu -f file c:\data.    sets file to data.
  25.                 tbu -f file c:\data     sets file to data
  26.  
  27.   -x  Parse file extension only.       <sym> <filespec>
  28.       Sets symbol to the extension portion of arg1. The dot name/
  29.       extension separator is always removed.
  30.       ERRORLEVEL:  Length of resulting string.
  31.       Example:  tbu -e ext c:\cmd\tbu.exe  sets ext to exe
  32.  
  33.   -n  Parse name only.                 <sym> <filespec>
  34.       Sets symbol to the name portion of arg1. The dot name/
  35.       extension separator is always removed.
  36.       ERRORLEVEL:  Length of resulting string.
  37.       Example:  tbu -n name c:\tbu.exe  sets name to tbu
  38.  
  39.   -l  Parse disk drive letter only.    <sym> <filespec>
  40.       Sets symbol to the drive letter portion of arg1. The colon
  41.       drive/name separator is always removed.
  42.       ERRORLEVEL:  Length of resulting string.
  43.       Example:  tbu -d drive c:\tbu.exe  sets drive to c
  44.  
  45.   -c  Input character from keyboard.   <sym> [prompt] [valid] [secs]
  46.       Sets symbol to the upper case value of the character entered.
  47.       Optional prompt (may be ""). Optional valid characters, are
  48.       not case sensitive. Optional seconds for timed input. Accepts
  49.       printable keys only, carriage return = !. Keys |, <, and > are
  50.       not allowed because of conflicts with DOS i/o redirection.
  51.       ERRORLEVEL:  ASCII code of character entered, 0 = timeout.
  52.       Example:  tbu -c ans "Ok (Y/N)?"  sets ans to any & prompts.
  53.       Example:  tbu -c ans "" yn        sets ans to Y or N.
  54.       Example:  tbu -c ans "" "" 20     sets ans to any & times 20 secs.
  55.  
  56.   -s  Input string from keyboard.      <sym> [prompt] [max length]
  57.       Sets symbol to the string entered. Optional prompt (may
  58.       be ""). Optional max input length (128 chars default).
  59.       ERRORLEVEL:  Length of string entered.
  60.       Example:  tbu -s user "Your name: "  sets user to string.
  61.  
  62.   -r  Get DOS revision.                <sym> [major|minor|both]
  63.       Sets symbol to the desired portion of the DOS version.
  64.       Default = Both.
  65.       ERRORLEVEL:  None.
  66.       Example:  tbu -r rev major
  67.  
  68.   -d  Get system date.                 <sym> <format>
  69.       Sets symbol to the system date in the specified format.
  70.       The format is embedded in a string:  $[modifier]<element type>
  71.       Element types:        Allowable modifiers:
  72.           y = year              [a for 2 digit year]
  73.           m = month             [0_wWaA]
  74.           d = day of month      [0_]
  75.           j = Julian date       [0_]
  76.           k = day of week       [0_wWaA] (numeric Sun=0, Mon=1,...)
  77.       Modifiers for numeric values:
  78.           0 = zero pad on left
  79.           _ = space pad on left
  80.       Modifiers for string values:
  81.           w = full word instead of number (W = all upper case)
  82.           a = abbreviated word instead of number (A = all upper case)
  83.       ERRORLEVEL:  None.
  84.       Example:  tbu -d date "The date is: $wk, $wm, $0d $y"
  85.  
  86.   -t  Get system time.                 <sym> <format>
  87.       Sets symbol to the system time in the specified format.
  88.       The format is embedded in a string:  $[modifier]<element type>
  89.       Element types:        Allowable modifiers:
  90.           h = hours             [0_]
  91.           m = minutes
  92.           s = seconds
  93.           a = AM/PM             (h = 1-12 if present)
  94.           d = daylight          (Y = daylight savings time in effect)
  95.       Modifiers for numeric values:
  96.           0 = zero pad on left
  97.           _ = space pad on left
  98.       ERRORLEVEL:  None.
  99.       Example:  tbu -t time "The time is: $0h:$m:$s $a"
  100.  
  101.   -b  Substitute pattern for data.     <sym> <patt> <data> <string>
  102.       Replaces pattern with data in string.  Sets symbol to
  103.       the new string.
  104.       ERRORLEVEL:  Length of new string.
  105.       Example:  tbu -b new "change this" "to this" "Point: change this"
  106.  
  107. Another Smileware program from Planet Terus <PT>.  If you like it, send
  108. us a smile "*<B-)" at IFNA(tm) 104/43 -- (303) 469-7161.
  109.